<tagLib name="html" />
<style>
select{height:30px;}
</style>
<div id="main-content">
    <div id="main" class="main">
		<div class="user-hd">
			<div id="upload" class="fr">
                <a href="{:U('User/add')}" class="uploadify-button" style="position: absolute;  bottom: 8px; right: 25px;">添加用户</a>
            </div>
			<h2>系统管理>>{$page_title}</h2>
		</div>
		<div class="clearfix searchspin">
            <dl>
                <dt>筛选条件:</dt>
                <dd>
                    <form action="{:U('User/userList')}" method="get">
						
					<div class="diy_select mr5">
						<input type="hidden" name="group_id" value="{$group_id}" class="diy_select_input">
						<input type="text" value="<if condition="0 LT $group_id">{$user_group_options[$group_id]}</if>" placeholder="请选择角色" class="diy_select_txt" readonly="readonly">
						<div class="diy_select_btn">
							<span></span>
						</div>
						<ul class="diy_select_list" style="display: none;">
							<volist name="user_group_options" id="vo">
							<li data-value="{$key}">{$vo}</li>
							</volist>
						</ul>
					</div>
					<input type="text" maxlength="36" name="keywords" value="{$keywords}" placeholder="请输入关键字" class="bg-input ml5" />
					<a href="{:U('User/userList')}" class="sblue-btn" style="height:28px;width:68px;">清空 </a>
					<input type="submit" class="sblue-btn" value="检索" />
					</form>
                </dd>
            </dl>
            
        </div>
        <!-- 视频上传列表 start -->
        <div class="spin-cont">
            <table>
                <tr>
                    <th style="width: 50px;">选择</th>
                    <th class="spin-tit" style="width: 160px;">用户名</th>
                    <th class="spin-tit" style="width: 160px;">姓名</th>
					<th class="spin-tit">角色</th>
                    <th style="width: 108px;">手机</th>
					<th style="width: 160px;">状态</th>
					<th style="width: 160px;">最后登录时间</th>
                    <th style="width: 108px;">操作</th>
                </tr>
                <form name="data_form" id="data_form" action="" method="post">
                <volist name="data_list_data[data_list]" id="vo">
                <tr>
                    <td>
						<if condition="1 NEQ $vo[user_id]">
                        <input type="checkbox" name="data_ids[]" class="data_ids" value="{$vo.user_id}" />
						</if>
                    </td>
                    <td class="spin-tit">{$vo.user_name}</td>
                    <td class="spin-tit">{$vo.nick_name}</td>
					<td class="spin-tit">{$user_group_options[$vo[group_id]]}</td>
                    <td>{$vo.mobile|default='-'}</td>
					<td>
						<if condition="1 EQ $vo[status]">
							<font color="green">正常</font>
						<else/>
							<font color="red">禁用</font>
						</if>
					</td>
					<td><notempty name="vo.last_login_time">{$vo.last_login_time|date="Y-m-d H:i", ###}</notempty></td>
                    <td class="spin-tit">
						<if condition="1 NEQ $vo[user_id]">
							<a href="{:U('User/edit', array('user_id'=>$vo[user_id]))}" class="delfilebtn" >编辑</a>
							&nbsp; | &nbsp;
							<if condition="1 EQ $vo[status]">
								<a href="javascript:;" onclick="updateUser('{:U("User/update", array("user_id"=>$vo[user_id], "status"=>2, "user_name"=>$vo[user_name]))}', '是否确认禁用该用户？被禁用的用户将无法登录。')" class="delfilebtn" >禁用</a>
							<else/>
								<a href="javascript:;" onclick="updateUser('{:U("User/update", array("user_id"=>$vo[user_id], "status"=>1))}', '是否确认启用该用户？')" class="delfilebtn" >启用</a>
							</if>
						<else/>
							&nbsp;
						</if>
                    </td>
                </tr>
                </volist>
				<input type="hidden" name="option" id="option" value="" />
                </form>
            </table>
            <div class="option_bar clearfix" style="padding-top:15px;">
                <label>
                    <input type="checkbox" class="checkbox_all" onclick="checkAll('data_ids')" /> 全选
                </label>
                <a href="javascript:;" onclick="updateUsers('stop')" class="gray-btn">全部禁用</a>
				<a href="javascript:;" onclick="updateUsers('go')" class="gray-btn">全部启用</a>
            </div>
            <div class="page txt-center">
                {$data_list_data.pager}
            </div>
        </div>
    </div>
</div>